$(function () {
	var chart;
	chart = Highcharts.chart('businessProcessContainer', {
	    chart: {
	        type: 'pie',
	        size: '100%',
	        options3d: {
	            enabled: true,
	            alpha: 45,
	            beta: 0
	        }
	    },
	    title: {
	        text: "<div style='text-align: center;font-size: 16px;font-weight: bold;'>销售阶段统计</div>"
	    },
	    tooltip: {
	        pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
	    },
	    plotOptions: {
	        pie: {
	            allowPointSelect: true,
	            cursor: 'pointer',
	            depth: 35,
	            dataLabels: {
	                enabled: true,
	                format: '{point.name}'
	            }
	        }
	    },
	    series: [{
	        type: 'pie',
	        name: '资料占比'
	    }]
	});		
////////////	
	$.ajax({
		type : 'get',
		dataType: "json",
		url : basePath+'report/businessProcessReport',
		data:{},
		success: function(data){
			var  browsers = [];
			$.each(data,function(i,n){	
				browsers.push([n.name,n.value]);
			});
			chart.series[0].setData(browsers);
			
		}
	});
///////////////////////	
	var chart2;
	chart2 = Highcharts.chart('businessDeptContainer', {
	    chart: {
	        type: 'pie',
	        size: '100%',
	        options3d: {
	            enabled: true,
	            alpha: 45,
	            beta: 0
	        }
	    },
	    title: {
	        text: "<div style='text-align: center;font-size: 16px;font-weight: bold;'>销售机会统计</div>"
	    },
	    tooltip: {
	        pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
	    },
	    plotOptions: {
	        pie: {
	            allowPointSelect: true,
	            cursor: 'pointer',
	            depth: 35,
	            dataLabels: {
	                enabled: true,
	                format: '{point.name}'
	            }
	        }
	    },
	    series: [{
	        type: 'pie',
	        name: '资料占比'
	    }]
	});
//////////
	/*
	$.ajax({
		type : 'get',
		dataType: "json",
		url : basePath+'report/businessDeptReport',
		data:{},
		success: function(data){
			var  browsers = [];
			$.each(data,function(i,n){	
				browsers.push([n.name,n.value]);
			});
			chart2.series[0].setData(browsers);
			
		}
	});	
	*/
/////////////	
});
////////////

